#include<stdio.h>
int main()
{
	const int num[6]={0,1,1,2,3,5};	
	int n=0;
	while(scanf("%d",&n)!=EOF)
	{
		if(n<=5) 
			printf("%d\n",num[n]);
		else
		{
			int num1=num[4],num2=num[5];
			for(int i=6;i<=n;i++)
			{
				int tmp=num1+num2;
				num1=num2;
				num2=tmp;
			}
			printf("%d\n",num2);
		}
	}
	return 0;
}
